package com.zhs.smartmall.product.dto;

import io.swagger.annotations.ApiModel;
import lombok.*;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

/**
 *
 * @author zhenghuisheng
 * @since 2023-11-11
 */
@Data
@ApiModel(value = "PmsAttrDto")
public class PmsAttrDto implements Serializable {
        //表字段
        private static final long serialVersionUID = 1L;
        @JsonSerialize(using = ToStringSerializer.class)
        @ApiModelProperty(value = "主键")
        private Long id;

        @ApiModelProperty(value = "属性名")
        private String attrName;

        @ApiModelProperty(value = "是否需要检索[0-不需要，1-需要]")
        private Integer searchType;

        @ApiModelProperty(value = "值类型[0-为单个值，1-可以选择多个值]")
        private Integer valueType;

        @ApiModelProperty(value = "属性图标")
        private String icon;

        @ApiModelProperty(value = "可选值列表[用逗号分隔]")
        private String valueSelect;

        @ApiModelProperty(value = "属性类型[0-销售属性，1-基本属性")
        private Integer attrType;

        @JsonSerialize(using = ToStringSerializer.class)
        @ApiModelProperty(value = "启用状态[0 - 禁用，1 - 启用]")
        private Long enable;

        @JsonSerialize(using = ToStringSerializer.class)
        @ApiModelProperty(value = "所属分类")
        private Long catelogId;

        @ApiModelProperty(value = "快速展示【是否展示在介绍上；0-否 1-是】，在sku中仍然可以调整")
        private Integer showDesc;

        @ApiModelProperty(value = "创建时间")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date createTime;

        @ApiModelProperty(value = "更新时间")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date updateTime;

        @ApiModelProperty(value = "是否删除")
        private Integer isDeleted;

        //=====================自定义字段=====================

        //id
        private List<String> idList;
}
